package com.woniuxy.secondhand.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 聊天信息
 * </p>
 *
 * @author chaohuijiang
 * @since 2020-09-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("SEC_CHATMSG")
@ApiModel(value="SecChatmsg对象", description="聊天信息")
@KeySequence("SEC_CHAT")
public class SecChatmsg implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "CHATMSG_ID",type = IdType.INPUT)
    private Integer chatmsgId;

    @ApiModelProperty(value = "用户2")
    @TableField("USERID1")
    private String userid1;

    @ApiModelProperty(value = "聊天内容")
    @TableField("MSG")
    private String msg;

    @ApiModelProperty(value = "聊天图片")
    @TableField("IMG")
    private String img;

    @ApiModelProperty(value = "用户2")
    @TableField("USERID2")
    private String userid2;

    @ApiModelProperty(value = "软删除")
    @TableField("FLAG")
    private Integer flag;

    @ApiModelProperty(value = "用户1发消息时间")
    @TableField("USER1CREATETIME")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime user1createtime;

    @ApiModelProperty(value = "用户2发消息时间")
    @TableField("USER2CREATETIME ")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime USER2CREATETIME ;


}
